<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var reverseWords = function () {
            // let news=s.split(" ")
            // for(let i=0;i<news.length;i++){
            //     news[i]=re(news[i])
            //     return re(news[i])
            // }
            // s=news.join(" ")
            let s="abc"
            s.split("")
            console.log(s)
        };

        var re = function (s) {
            let left = 0
            let right = s.length - 1
            while (left < right) {
                let temp = s[left]
                s[left] = s[right]
                s[right] = temp
                left++
                right--
            }
            return s
        }

        reverseWords()
    </script>
</body>

</html>